#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int a = 1;
	int b = 1;
	int c = 0;
	int n = 0;
	int r = 0;
	scanf("%d", &n);
	if (n == 1 || n == 2)
	{
		r = 1;
		printf("%d", r);
	}
	else
	{
		while (n - 2)
		{
			c = a + b;
			a = b;
			b = c;
			n--;
		}
		printf("%d", c);
	}
	return 0;
}